#define _CRT_SECURE_NO_WARNINGS 1

class Solution {
public:
    string getSmallestString(string s) {
        int n = s.size();
        for (int i = 0; i < n - 1; i++)
        {
            int cur = s[i] - '0';
            int next = s[i + 1] - '0';
            if (cur % 2 == next % 2 && cur > next)
            {
                swap(s[i], s[i + 1]);
                return s;
            }
        }
        return s;
    }
};